<div class="indexcontent">
    <div class="content">
        <div class="leftcontent">
            <?php echo $this->load->view('html/left'); ?>
        </div><!--leftcontent-->
        <div class="rightcontent">
            <?php echo $this->load->view('html/banner'); ?> 
            <div class="linkpre">
                <ul>
                    <li><a href="<?php echo base_url() ?>">Trang chủ</a></li>
                    <li><p>&raquo;</p></li>
                    <li><p>Kết quả tìm kiếm</p></li>
                </ul>
            </div><!--linkpre-->
            <div class="boxsma">
                <div class="T-4"><p><?php echo $keywords; ?></p></div>
                <div class="C-3">
                    <?php if (isset($listproductItems) && !empty($listproductItems)) { ?>
                        <?php foreach ($listproductItems as $productItem) { ?>
                            <div class="boxSP-1">
                                <ul>
                                    <li class="pic">
                                        <table cellspacing="0" cellpadding="0" width="100%"><tbody><tr><td class="pic_5">
                                                        <a href="<?php echo urlAlias('hcm/'.$productItem->name_alias . '/item-' . $productItem->products_id) ?>" title="<?php echo $productItem->name ?>"><img src="<?php echo base_url() ?>uploads/products/avatar/<?php echo $productItem->image; ?>" alt="<?php echo $productItem->name ?>" /></a>
                                                    </td></tr></tbody></table>
                                    </li>
                                    <li class="tit"><h2><a href="<?php echo urlAlias('hcm/'.$productItem->name_alias . '/item-' . $productItem->products_id) ?>" title="<?php echo $productItem->name ?>"><?php echo $productItem->name ?></a></h2></li>
                                    <li class="pri">
                                        <?php if ($productItem->sprice) { ?>
                                            <p><?php echo number_format($productItem->sprice, 0, ',', '.') ?> đ</p>
                                        <?php } ?>
                                        <span><?php echo number_format($productItem->price, 0, ',', '.') ?> đ</span>
                                    </li>
                                    <li class="vie">
                                        <p><?php echo $productItem->viewed; ?></p>
                                        <span>lượt xem</span>
                                    </li>
                                    <li class="mua">
                                        <a href="<?php echo urlAlias('hcm/'.$productItem->name_alias . '/item-' . $productItem->products_id) ?>" title="<?php echo $productItem->name ?>"><img src="<?php echo base_url() ?>templates/images/mua.png" alt="<?php echo $productItem->name ?>" /></a>
                                    </li>
                                </ul>
                            </div><!--boxSP-->
                        <?php } ?>
                         <div class="clear"></div>
                         <?php if(!empty($pagination)){ ?>
                        <div id="pagination" class="xemthem">
                        <a class="arrow" href="javascript:void(0);">&nbsp;</a>
                        <a class="more" href="javascript:void(0);">&nbsp;</a>
                        <ul>
                            <li><?php echo $pagination;?></li>
                        </ul>
                    </div><!--xemthem-->
                       <?php } ?>
                    <?php } else { ?>
                        <p>&nbsp;</p>
                        <p style="text-align:center; font-weight:bold">Dữ liệu đang được cập nhật...</p>
                    <?php } ?> 
                </div><!--C-3-->
                 <div class="T-4"><p>Các sản phẩm liên quan</p></div>
                 <div class="C-3">
                    <?php if (isset($otherProductItems) && !empty($otherProductItems)) { ?>
                        <?php foreach ($otherProductItems as $otherproductItem) { ?>
                            <div class="boxSP-1">
                                <ul>
                                    <li class="pic">
                                        <table cellspacing="0" cellpadding="0" width="100%"><tbody><tr><td class="pic_5">
                                                        <a href="<?php echo urlAlias('hcm/'.$otherproductItem->name_alias. '/item-' . $otherproductItem->products_id) ?>" title="<?php echo $otherproductItem->name ?>"><img src="<?php echo base_url() ?>uploads/products/avatar/<?php echo $otherproductItem->image; ?>" alt="<?php echo $otherproductItem->name ?>" /></a>
                                                    </td></tr></tbody></table>
                                    </li>
                                    <li class="tit"><h2><a href="<?php echo urlAlias('hcm/'.$otherproductItem->name_alias. '/item-' . $otherproductItem->products_id) ?>" title="<?php echo $otherproductItem->name ?>"><?php echo $otherproductItem->name ?></a></h2></li>
                                    <li class="pri">
                                        <?php if ($otherproductItem->sprice) { ?>
                                            <p><?php echo number_format($otherproductItem->sprice, 0, ',', '.') ?> đ</p>
                                        <?php } ?>
                                        <span><?php echo number_format($otherproductItem->price, 0, ',', '.') ?> đ</span>
                                    </li>
                                    <li class="vie">
                                        <p><?php echo $otherproductItem->viewed; ?></p>
                                        <span>lượt xem</span>
                                    </li>
                                    <li class="mua">
                                        <a href="<?php echo urlAlias('hcm/'.$otherproductItem->name_alias . '/item-' . $otherproductItem->products_id) ?>" title="<?php echo $otherproductItem->name ?>"><img src="<?php echo base_url() ?>templates/images/mua.png" alt="<?php echo $otherproductItem->name ?>" /></a>
                                    </li>
                                </ul>
                            </div><!--boxSP-->
                        <?php } ?>
                         <div class="clear"></div>
                         <?php if(!empty($pagination)){ ?>
                        <div id="pagination" class="xemthem">
                        <a class="arrow" href="javascript:void(0);">&nbsp;</a>
                        <a class="more" href="javascript:void(0);">&nbsp;</a>
                        <ul>
                            <li><?php echo $pagination;?></li>
                        </ul>
                    </div><!--xemthem-->
                       <?php } ?>
                    <?php } else { ?>
                        <p>&nbsp;</p>
                        <p style="text-align:center; font-weight:bold">Dữ liệu đang được cập nhật...</p>
                    <?php } ?> 
                </div><!--C-3-->
            </div><!--boxsma-->
        </div><!--rightcontent-->
    </div><!--content-->
</div>